#include <WinTen.h>
#include <Windows.h>
#include <extend.h>

extern HINSTANCE _hInstance;

//----------------------------------------------------------------------------//

CLIPPER GETINSTANC() { _retnl( ( LONG ) _hInstance ); }

//----------------------------------------------------------------------------//

CLIPPER POSTQUITME() // SSAGE( nExitCode )
{
   PostQuitMessage( _parni( 1 ) );
}

//----------------------------------------------------------------------------//

CLIPPER SHOWWINDOW()
{
   HWND hWnd = ( HWND ) _parnl( 1 );

   if( IsWindow( hWnd ) )
      _retl( ShowWindow( hWnd, ( PCOUNT() > 1 ) ? _parni( 2 ): SW_NORMAL ) );
   else
      _retl( FALSE );
}

//----------------------------------------------------------------------------//

CLIPPER SETFOCUS()
{
   HWND hWnd = ( HWND ) _parnl( 1 );

   if( IsWindow( hWnd ) )
      SetFocus( hWnd );
}

//----------------------------------------------------------------------------//

CLIPPER GETFOCUS()
{
   _retnl( ( LONG ) GetFocus() );
}

//----------------------------------------------------------------------------//
